﻿using System.Configuration;
using GC_RF.Domain.Constants;

namespace GC_RF.Site.Resources
{
	public static class AppConfig
	{
		#region Properties

		public static string BackgroundImagesFolderPath { get { return ConfigurationManager.AppSettings["BackgroundImagesFolderPath"]; } }

		public static string NewsImagesFolderPath { get { return ConfigurationManager.AppSettings["NewsImagesFolderPath"]; } }

		public static string ImagesFolderPath { get { return ConfigurationManager.AppSettings["ImagesFolderPath"]; } }

		public static string HostName { get { return ConfigurationManager.AppSettings["Host.Name"]; } }

		public static string SystemEmailAddress { get { return ConfigurationManager.AppSettings["NoreplyEmail"]; } }

		public static string SystemEmailName { get { return ConfigurationManager.AppSettings["NoreplyName"]; } }

		public static int PasswordResetTokenLifetimeMinutes
		{
			get
			{
				var value = ConfigurationManager.AppSettings["PasswordResetTokenLifetimeMinutes"];
				int result;
				int.TryParse(value, out result);
				return result > 0 ? result : DefaultValues.DefaultResetPaswordTokenLifitimeMinutes;
			}
		}

		#endregion
	}
}